Chateau Gaillard
------------------------

PC conversion by David Stein, 1/5/01-1/8/01

BACKGROUND

This game was originally published in an adventure book - the same book
that contained Werewolves and Wanderers and The Aftermath of the Asimovian
Disaster, which is now, unfortunately, lost and presumed permanently MIA.
Not even the name of the original author is known, and in fact, a fourth
adventure called Citadel Pershu may have been printed the same book. The
book was published in the early 1980s and was intended as a tutorial for
creating text adventures.

This game is the most complex of the three (or four) adventures. You stumble
down a hole and end up in an underground ruins. The parser in this one is
more advanced than the others; it's the more common two-word variety, and
it even recognizes abbreviations and synonyms.

The original code was written in BASIC, and I've gone out of my way to
convert it to C++ as faithfully as possible. The source code is included as
"Chateau Gaillard.cpp" and a copy of the original program listing is included
as "Chateau Gaillard.basic". This program is taken from a Commodore 64 port
that I did sometime in the '80s, and it had a few odd changes that I was
probably required to make to get it working on that machine, such as the
initial odd batch of GOTO statements. This was a MUCH harder conversion than
the other two titles - the program flow isn't nearly as tidy - and I had to
use lots of variables and logical constructs to match the codestream of the
original code.

Tandy BASIC allowed for data to be bundled into the code itself in an odd
sort of arrangement: the DATA statement could be followed by many sets of
data, comma-delineated, which could then be read into arrays sequentially.
I've separated this data into a text file ("chatdata.txt") and all the
READ statements are now fgets() calls. Also, Tandy BASIC did something else
strange: it allowed an array and a single variable to have the same name.
Thus, you could have a string named T$ and an array of strings named T$(2).
In addition to converting all string variable names from a $ to an s (t$
becomes ts), I've had to change the name of the single variables in such
collisions by adding a 1 (thus, the above single-string variable becomes
ts1.) Finally, a few slightly convoluted functions, including lots of GOTO
statements that disrupt program flow, had to be inverted and tinkered with
to avoid using those blasted commands in this pristine C++.
